package com.ocp.socket.busi.dataTempUtils.mapper;

import com.ocp.socket.busi.dataTempUtils.bean.DataTempVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author : zhangzh
 * @description :
 * @Date Create in 13:27 2019/3/9
 * @Modified By :
 **/
@Mapper
public interface DataTempUtilsMapper {

    int insertDataTemp(@Param("tableName") String tableName,@Param("dataTempVo") DataTempVo dataTempVo);

    /**
     * 批量插入温度数据
     * @param tableName
     * @param datas
     * @return
     */
    int insertDataTemps(@Param("tableName") String tableName,@Param("datas") List<DataTempVo> datas);

    Double getMaxValByLineCode(@Param("tableList") List<String> tableList, @Param("lineCode") String lineCode, @Param("hallId") Integer hallId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Double getDiffAvgValBylineCode(@Param("tableList") List<String> tableList, @Param("lineCode01") String lineCode01, @Param("lineCode02") String lineCode02, @Param("hallId") Integer hallId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 删除温度的状态表数据
     *
     * @param tableName 表明
     * @param hallId    奶厅id
     * @return
     */
    int delStatTempData(@Param("tableName")String tableName, @Param("hallId")Integer hallId);
}
